3.1.66 \(\int \cos ^6(c+d x) (a+i a \tan (c+d x))^5 \, dx\) [66]

Optimal. Leaf size=55 \[ -\frac {2 i a^8}{3 d (a-i a \tan (c+d x))^3}+\frac {i a^7}{2 d (a-i a \tan (c+d x))^2} \]

[Out]

-2/3*I*a^8/d/(a-I*a*tan(d*x+c))^3+1/2*I*a^7/d/(a-I*a*tan(d*x+c))^2

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45} \begin {gather*} \frac {i a^7}{2 d (a-i a \tan (c+d x))^2}-\frac {2 i a^8}{3 d (a-i a \tan (c+d x))^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^6*(a + I*a*Tan[c + d*x])^5,x]

[Out]

(((-2*I)/3)*a^8)/(d*(a - I*a*Tan[c + d*x])^3) + ((I/2)*a^7)/(d*(a - I*a*Tan[c + d*x])^2)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \cos ^6(c+d x) (a+i a \tan (c+d x))^5 \, dx &=-\frac {\left (i a^7\right ) \text {Subst}\left (\int \frac {a+x}{(a-x)^4} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^7\right ) \text {Subst}\left (\int \left (\frac {2 a}{(a-x)^4}-\frac {1}{(a-x)^3}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {2 i a^8}{3 d (a-i a \tan (c+d x))^3}+\frac {i a^7}{2 d (a-i a \tan (c+d x))^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.34, size = 50, normalized size = 0.91 \begin {gather*} \frac {a^5 (5 \cos (c+d x)-i \sin (c+d x)) (-i \cos (5 (c+d x))+\sin (5 (c+d x)))}{24 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^6*(a + I*a*Tan[c + d*x])^5,x]

[Out]

(a^5*(5*Cos[c + d*x] - I*Sin[c + d*x])*((-I)*Cos[5*(c + d*x)] + Sin[5*(c + d*x)]))/(24*d)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 230 vs. \(2 (47 ) = 94\).
time = 0.24, size = 231, normalized size = 4.20

method result size
risch \(-\frac {i a^{5} {\mathrm e}^{6 i \left (d x +c \right )}}{12 d}-\frac {i a^{5} {\mathrm e}^{4 i \left (d x +c \right )}}{8 d}\) \(38\)
derivativedivides \(\frac {\frac {i a^{5} \left (\sin ^{6}\left (d x +c \right )\right )}{6}+5 a^{5} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )-10 i a^{5} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{6}-\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{12}\right )-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )-\frac {5 i a^{5} \left (\cos ^{6}\left (d x +c \right )\right )}{6}+a^{5} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) \(231\)
default \(\frac {\frac {i a^{5} \left (\sin ^{6}\left (d x +c \right )\right )}{6}+5 a^{5} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )-10 i a^{5} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{6}-\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{12}\right )-10 a^{5} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )-\frac {5 i a^{5} \left (\cos ^{6}\left (d x +c \right )\right )}{6}+a^{5} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) \(231\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^5,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/6*I*a^5*sin(d*x+c)^6+5*a^5*(-1/6*sin(d*x+c)^3*cos(d*x+c)^3-1/8*sin(d*x+c)*cos(d*x+c)^3+1/16*sin(d*x+c)*
cos(d*x+c)+1/16*d*x+1/16*c)-10*I*a^5*(-1/6*sin(d*x+c)^2*cos(d*x+c)^4-1/12*cos(d*x+c)^4)-10*a^5*(-1/6*sin(d*x+c
)*cos(d*x+c)^5+1/24*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+1/16*d*x+1/16*c)-5/6*I*a^5*cos(d*x+c)^6+a^5*(1/6*
(cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)+5/16*d*x+5/16*c))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (43) = 86\).
time = 0.49, size = 93, normalized size = 1.69 \begin {gather*} -\frac {3 i \, a^{5} \tan \left (d x + c\right )^{4} + 10 \, a^{5} \tan \left (d x + c\right )^{3} - 12 i \, a^{5} \tan \left (d x + c\right )^{2} - 6 \, a^{5} \tan \left (d x + c\right ) + i \, a^{5}}{6 \, {\left (\tan \left (d x + c\right )^{6} + 3 \, \tan \left (d x + c\right )^{4} + 3 \, \tan \left (d x + c\right )^{2} + 1\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^5,x, algorithm="maxima")

[Out]

-1/6*(3*I*a^5*tan(d*x + c)^4 + 10*a^5*tan(d*x + c)^3 - 12*I*a^5*tan(d*x + c)^2 - 6*a^5*tan(d*x + c) + I*a^5)/(
(tan(d*x + c)^6 + 3*tan(d*x + c)^4 + 3*tan(d*x + c)^2 + 1)*d)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 34, normalized size = 0.62 \begin {gather*} \frac {-2 i \, a^{5} e^{\left (6 i \, d x + 6 i \, c\right )} - 3 i \, a^{5} e^{\left (4 i \, d x + 4 i \, c\right )}}{24 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^5,x, algorithm="fricas")

[Out]

1/24*(-2*I*a^5*e^(6*I*d*x + 6*I*c) - 3*I*a^5*e^(4*I*d*x + 4*I*c))/d

________________________________________________________________________________________

Sympy [A]
time = 0.29, size = 80, normalized size = 1.45 \begin {gather*} \begin {cases} \frac {- 8 i a^{5} d e^{6 i c} e^{6 i d x} - 12 i a^{5} d e^{4 i c} e^{4 i d x}}{96 d^{2}} & \text {for}\: d^{2} \neq 0 \\x \left (\frac {a^{5} e^{6 i c}}{2} + \frac {a^{5} e^{4 i c}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**6*(a+I*a*tan(d*x+c))**5,x)

[Out]

Piecewise(((-8*I*a**5*d*exp(6*I*c)*exp(6*I*d*x) - 12*I*a**5*d*exp(4*I*c)*exp(4*I*d*x))/(96*d**2), Ne(d**2, 0))
, (x*(a**5*exp(6*I*c)/2 + a**5*exp(4*I*c)/2), True))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 187 vs. \(2 (43) = 86\).
time = 0.83, size = 187, normalized size = 3.40 \begin {gather*} -\frac {2 i \, a^{5} e^{\left (18 i \, d x + 12 i \, c\right )} + 15 i \, a^{5} e^{\left (16 i \, d x + 10 i \, c\right )} + 48 i \, a^{5} e^{\left (14 i \, d x + 8 i \, c\right )} + 85 i \, a^{5} e^{\left (12 i \, d x + 6 i \, c\right )} + 90 i \, a^{5} e^{\left (10 i \, d x + 4 i \, c\right )} + 57 i \, a^{5} e^{\left (8 i \, d x + 2 i \, c\right )} + 3 i \, a^{5} e^{\left (4 i \, d x - 2 i \, c\right )} + 20 i \, a^{5} e^{\left (6 i \, d x\right )}}{24 \, {\left (d e^{\left (12 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (10 i \, d x + 4 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 2 i \, c\right )} + 15 \, d e^{\left (4 i \, d x - 2 i \, c\right )} + 6 \, d e^{\left (2 i \, d x - 4 i \, c\right )} + 20 \, d e^{\left (6 i \, d x\right )} + d e^{\left (-6 i \, c\right )}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*(a+I*a*tan(d*x+c))^5,x, algorithm="giac")

[Out]

-1/24*(2*I*a^5*e^(18*I*d*x + 12*I*c) + 15*I*a^5*e^(16*I*d*x + 10*I*c) + 48*I*a^5*e^(14*I*d*x + 8*I*c) + 85*I*a
^5*e^(12*I*d*x + 6*I*c) + 90*I*a^5*e^(10*I*d*x + 4*I*c) + 57*I*a^5*e^(8*I*d*x + 2*I*c) + 3*I*a^5*e^(4*I*d*x -
2*I*c) + 20*I*a^5*e^(6*I*d*x))/(d*e^(12*I*d*x + 6*I*c) + 6*d*e^(10*I*d*x + 4*I*c) + 15*d*e^(8*I*d*x + 2*I*c) +
 15*d*e^(4*I*d*x - 2*I*c) + 6*d*e^(2*I*d*x - 4*I*c) + 20*d*e^(6*I*d*x) + d*e^(-6*I*c))

________________________________________________________________________________________

Mupad [B]
time = 3.28, size = 53, normalized size = 0.96 \begin {gather*} \frac {a^5\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,3{}\mathrm {i}\right )}{6\,d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^3-{\mathrm {tan}\left (c+d\,x\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^6*(a + a*tan(c + d*x)*1i)^5,x)

[Out]

(a^5*(tan(c + d*x)*3i + 1))/(6*d*(3*tan(c + d*x) - tan(c + d*x)^2*3i - tan(c + d*x)^3 + 1i))

________________________________________________________________________________________